/*
** my_strcat.c for zappy in /home/fassi_c//zappy2/zappouet/server/utils
**
** Made by clement fassi
** Login   <fassi_c@epitech.net>
**
** Started on  Wed Jun 29 12:00:50 2011 clement fassi
** Last update Wed Jun 29 12:00:53 2011 clement fassi
*/

#include <string.h>

#include "utils.h"

char	*my_strcat(char *str1, char *str2)
{
  char	*res;
  int	i = 0;
  int	j = 0;

  res = xmalloc((strlen(str1) + strlen(str2) + 2) * sizeof(*res));
  while (str1[i])
    {
      res[j] = str1[i];
      i++;
      j++;
    }
  i = 0;
  while (str2[i])
    {
      res[j] = str2[i];
      i++;
      j++;
    }
  res[j] = '\0';
  return (res);
}
